home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
019a
/
amac40.zip
/
SIZE15.QM
< prev
next >
Wrap
Text File
|
1991-07-28
|
13KB
|
232 lines
* SIZE15.QM, v1.5f
* Macros To Show Byte Size of Macros
* Written by Tom Hogshead
* July 28, 1991
*
* ┌──────────────────────────────── Index) ────────────────────────────┐
* │
* │ @(0) Shows Byte Size of SINGLE Macro <chg
* │
* │ @(9) Shows Byte Size of ALL Macros In A Txtfile <chg
* │
* │ See DSIZ.QM and DSIZ.BAT for ^F6 to sort Directory
* │ sizes by size (requires DX.EXE)
* │
* └─────────────────────────────────────────────────────────────────────┘
* SIZE15.QM are QEdit macros to quickly show byte size of a macro
* added to the end of the macro with an asterisk and space in column 1.
* See the end of each of these macros for byte size. Change c: to
* a ramdisk for faster operation.
* These macros require "QEdit and QMAC v2.1, February, 1990" or later.
* To BEGIN, just type "START SIZE" <Enter>. All pertinent files will be
* loaded in the "Ring" for viewing, and SIZE15.MAC is read.
* Alternatively, type "START SIZE 0" <Enter> and the disk copies of all
* files in the "Ring" will be loaded ready for editing, saving time.
* For other macros see ALLMACRO.INF.
*
* ----------------------------------------------------------------------
* @(9) Macro To Show Byte Size Of ALL Macros In A Txtfile
* ----------------------------------------------------------------------
* To run, cursor may be anywhere in a txtfile. Press Alt and 9 at the
* same time, and the size of each macro is added at the end of each
* macro with an asterisk in column 1. Macros must be paragraphs with no
* blank lines, but paragraphs need NOT contain macros. QMACB.BAT must
* be available in your path. Word "macro_begin" (no _) must be used
* only at start of macro. Key and "macro_begin" must be on same line.
@9 macrobegin
onewindow * Close all windows |f
begfile * Get to begin of file
unmarkblock insertline begline * Insert temp line
dropanchor currentfilename *
storescrbuff "9" return * Get name to scratchbuff 9 |
cut * Delete temp line
NEXT: * Get ready to mark
FIND "macro" "begin" return * Find start of macro |
"I" return * |
jfalse END: * End macro if no more macros |
begline * Move to <key> begin |
altwordset * To make all keys a word |b
markword * Mark key |b
defaultwordset * Reset for wordright below |b
storescrbuff "7" return * Store <key> to scratchbuff 7 |
unmarkblock * |
markline * Mark start of macro |
endpara * Go to end of macro |
makectrofscreen * Quick look at end of macro |
writeblock "c:#.qm" return * Write macro block to C:#.qm |ae
addline * Add blank line at end of macro |
editfile return quit * Quit c:#.qm file from ring
editfile return * Load new macro block txtfile
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >C:!" * Add "mac", save list to temp
return return * Back from Dos
killfile quit * Kill/quit C:#.qm
editfile "C:!" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
killfile quit * Kill/quit C:!
getscrbuff "9" return * Insert orig file name |
cut * Get to scrap
editfile paste return * Load orig file * edit currentfilename
prevpara endpara cursordown * Move to blank line at macro end |
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits) |
cursorright * One space right |
getscrbuff "7" return * Get macro <key> |
endline * Move to end of <key> |
")" cursorleft * Add end parenthesis |
jump NEXT: * Loop again
END: *
unmarkblock * Unmark key
begfile * |
*
* 200 bytes Thu 09-13-1990 19:13:19
* 201 bytes Mon 05-06-1991 14:36:44
* 210 bytes Thu 05-16-1991 12:00:10 (TH @9 added author identification)
* 219 bytes Mon 07-01-1991 15:01:24 (TH @9 added macro <key>)
* 203 bytes Sat 07-06-1991 11:47:04 (TH @9 shortened)
* 202 bytes Tue 07-16-1991 21:20:32 (TH @9 chng key mark for scan codes |b)
* 201 bytes Sat 07-20-1991 09:00:24 (TH @9, removed unmarkblock |c)
* 201 bytes Mon 07-22-1991 17:26:34 (TH @9, changed c:$.qm to c:#.qm |e)
* 202 bytes Sun 07-28-1991 22:21:10 (TH @9, added onewindow |f)
*
* ----------------------------------------------------------------------
* @(0) Macro To Show Byte Size of SINGLE Macro Inserted At End Of Macro
* ----------------------------------------------------------------------
* Place cursor line anywhere in a txtfile macro and press @0. Macro
* size is added at the end of the macro as shown below. Macro must be a
* paragraph with NO blank lines. If the paragraph does NOT contain a
* macro, the macro stops executing with a beep, meaning "macro_begin"
* was not found in the paragraph. QMACB.BAT must be in path. Word
* "macro_begin" (no _) must be used only at start of macro. Key and
* "macro_begin" must be on same line.
@0 macrobegin
onewindow * Close all windows |f
unmarkblock insertline begline * Insert temp line
dropanchor currentfilename *
storescrbuff "9" return * Get name to scratchbuff 9
cut * Delete temp line
prevpara begline * Go to macro begin
NEXT: * Get ready to mark
markcharacter * Markblock begin |
endpara * Go to para end |f
markcharacter * Markblock end |
gotoblockbeg * Get to para begin
FIND "macro" "begin" return * Check if para is macro |
"LI" return *
jtrue HASMACRO: * If para is a macro, go to HASMACRO
* ELSE end macro
jump END: *
HASMACRO: * Come here if para has macro
begline * Move to <key> begin |
altwordset * To make all keys a word |b
markword * Mark key |b
defaultwordset * Reset for wordright below |b
storescrbuff "7" return * Store <key> to scratchbuff 7 |
markline * Mark start of macro |
endpara * Go to end of macro |
editfile "c:#.qm" return * |ae
killfile quit * Kill/quit C:#.qm |
makectrofscreen * Quick look at end of macro |
writeblock return * Write macro block to C:#.qm |
addline * Add blank line at end of macro |
editfile return * Load c:#.qm macro block txtfile
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >C:!" * Add "mac", save list to temp
return return * Back fom DOS
killfile quit * Kill/quit C:#.qm
editfile "C:!" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
killfile quit * Kill/quit C:!
getscrbuff "9" return * Insert orig file name
cut * Get to scrap
editfile paste return * Load orig file * edit currentfilename
prevpara endpara cursordown * Move to blank line at macro end |
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits) |
cursorright * One space right |
getscrbuff "7" return * Get macro <key> |
endline * Move to end of <key> |
")" cursorleft * Add end parenthesis |
END:
unmarkblock * Un-mark key
*
* 189 bytes Thu 09-13-1990 19:13:24
* 190 bytes Mon 05-06-1991 15:08:09
* 199 bytes Thu 05-16-1991 11:32:44 (TH @0 added author identification)
* 209 bytes Mon 07-01-1991 15:01:30 (TH @0 added macro <key>)
* 209 bytes Sat 07-06-1991 01:31:43 (TH @0 moved makectrofscreen up)
* 208 bytes Tue 07-16-1991 21:16:56 (TH @0 chng key mark for scan codes |b)
* 207 bytes Sat 07-20-1991 08:59:33 (TH @0, removed unmarkblock |c))
* 207 bytes Mon 07-22-1991 17:26:40 (TH @0, changed c:$.qm to c:#.qm |e)
* 208 bytes Sun 07-28-1991 22:16:17 (TH @0, added onewindow |f)
* Version History
* ---------------------------------------------------------------------
* 1.0 - Initial
* 1.1 - Added Alt_9 to show size of all macros in txtfile
* 1.1a - Modified @9 for paragraphs that are not macros
* 1.1b- Changed other file names in series, this is an update.
* 1.2 - Changed documentation only.
* - Changed .LST and .QL files.
* 1.3 - Modified macros slightly, @0 now checks if
* paragraph is a macro, like @9.
* 1.3a - Removed [d:]\[path] for location of QMAC from QMACB.BAT
* files. QMAC can be located anywhere in path.
* 1.3b - Modified documentation and added START.BAT.
* 1.4 - Added reference to DSIZ.QM and DSIZ.BAT.
* - Changed @9 and @0 to unmark byte size after running.
* 1.5 - Added author identification to macro size line.
* 1.5a - Changed @9 and @0 to include macro <key> in size line.
* 1.5b - Added makectrofscreen to and shortened @9.
* - Moved makectrofscreen up in @0. Updated comments.
* 1.5c - Changed @9 and @0 to mark keys using scan codes correctly.
* 1.5d - Removed unmarkblock from @9 and @0.
* - Included with AMAC39.ZIP, July 21, 1991.
* 1.5e - Changed temporary file c:$.qm to c:#.qm in @9 and @0
* in order to measure byte size of macros produced with
* @6 and @7 in MACRxx.QM, July 22, 1991.
* 1.5f - Minor documentation changes, 7/29/91.
* - Added onewindow to @9 and @0.
* - Changed markblockbeg/end to markcharacter in @0.
*
*
*
*